package task2;

import java.io.FileInputStream;
import java.io.FileOutputStream;

public class CopyImage {
    public static void main(String[] args) throws Exception{
        FileInputStream fis=new FileInputStream("D:\\1.png");
        FileOutputStream fos=new FileOutputStream("1.png");
        byte[]bys=new byte[1024];
        int len=0;
        while ((len=fis.read(bys))!=-1){
         fos.write(bys,0,len);
        }
        fos.close();
        fis.close();
    }
}
